package com.fingard.dsp.bank.reqrespobj.authcancelforrec.detail;

import com.fingard.xml.XElement;

public class ReqAuthCancelForRecDetail {
    /*
 * // [0]PayNo缴费编号||[1]PayAcctName缴费客户姓名||[2]PayAccNo缴费客户账号||[3]CertType证件类型||[4]CertNo证件号码||[5]DeadLine到期日||[6]ReqReserved3请求备用字段3||[7]ReqReserved4请求备用字段4
 * [8]是否同行||
 * [9]公私标志(0 对公  1对私)||
 * [10]行号
      <DetailRecord>
        2017092600025449||浦发1045133882||6225220100000018||2||||2021-09-30||||||1||1||111111111111
        2017092600025450||浦发1045133882||6225220100000017||2||||2021-09-30||||||0||0||
      </DetailRecord>
 * */
    /**
     * 缴费编号
     */
    public String authCode;

    public String oppActName;
    public String oppAct;

    /**
     * 0	身份证
     * 1	户口簿
     * 2	护照
     * 3	军官证
     * 4	士兵证
     * 5	港澳居民来往内地通行证
     * 6	台湾同胞来往内地通行证
     * 7	临时身份证
     * 8	外国人居留证
     * 9	警官证
     * 99	其他证件
     */
    public String certType;
    public String certNum;

    public String deadLine;
    public String reqReserved3 = "";
    public String reqReserved4 = "";

    /** 同行标志：1-同行，0-他行 */
    public String sameBnk;

    /** 公私标志： 1-对私,其他-对公*/
    public String isPrivate;

    public String cnapsCode;

    /** 卡折类型： 1-存折,2-卡,3-贷记卡,4-准贷记卡 */
    public String cardType;

    public ReqAuthCancelForRecDetail(String p_eachLine) {
        String[] vs = p_eachLine.trim().split("\\|\\|");
        if (vs != null) {
            if (vs.length >= 6) {
                authCode = vs[0];
                oppActName = vs[1];
                oppAct = vs[2];
                certType = vs[3];
                certNum = vs[4];
                deadLine = vs[5];
            }
            if (vs.length >= 8) {
                reqReserved3 = vs[6];
                reqReserved4 = vs[7];
            }
            if (vs.length >= 11) {
                sameBnk = vs[8];
                isPrivate = vs[9];
                cnapsCode = vs[10];
            }
            if (vs.length >= 12) {
                cardType = vs[11];
            }

        }
    }

    public ReqAuthCancelForRecDetail(XElement p_xelement) throws Exception {
        authCode = p_xelement.getSingleTextNotNull("PayNo");
        oppAct = p_xelement.getSingleTextNotNull("PayAccNo");
        oppActName = p_xelement.getSingleTextNotNull("PayAcctName");
        certType=p_xelement.getSingleTextNotNull("CertType");
        certNum=p_xelement.getSingleTextNotNull("CertNo");
        deadLine=p_xelement.getSingleTextNotNull("DeadLine");
        reqReserved3=p_xelement.getSingleTextNotNull("ReqReserved3");
        reqReserved4=p_xelement.getSingleTextNotNull("ReqReserved4");
    }
}
